From 83d9e7a1c3e88072e09bc12ff9289dda2168753d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 18 May 2019 12:57:41 +0000 Subject: [PATCH] Adapt tests We no longer have a clicked signal on GtkMenuButton. --- testsuite/a11y/menubutton.txt | 6 ------ testsuite/a11y/menubutton2.txt | 6 ------ testsuite/a11y/menubutton3.txt | 6 ------ testsuite/gtk/builder.c | 31 ++++--------------------------- 4 files changed, 4 insertions(+), 45 deletions(-) diff --git a/testsuite/a11y/menubutton.txt b/testsuite/a11y/menubutton.txt index ecfe438f70..6d4cf5445d 100644 --- a/testsuite/a11y/menubutton.txt +++ b/testsuite/a11y/menubutton.txt @@ -25,12 +25,6 @@ window1 layer: widget alpha: 1 - - image size: 16 x 16 - image description: (null) - - action 0 name: click - action 0 description: Clicks the button imagemenuitem "menu item" parent: menu diff --git a/testsuite/a11y/menubutton2.txt b/testsuite/a11y/menubutton2.txt index 5dafe5000c..ab604e2437 100644 --- a/testsuite/a11y/menubutton2.txt +++ b/testsuite/a11y/menubutton2.txt @@ -94,9 +94,3 @@ window1 layer: widget alpha: 1 - - image size: 16 x 16 - image description: (null) - - action 0 name: click - action 0 description: Clicks the button diff --git a/testsuite/a11y/menubutton3.txt b/testsuite/a11y/menubutton3.txt index 5dafe5000c..ab604e2437 100644 --- a/testsuite/a11y/menubutton3.txt +++ b/testsuite/a11y/menubutton3.txt @@ -94,9 +94,3 @@ window1 layer: widget alpha: 1 - - image size: 16 x 16 - image description: (null) - - action 0 name: click - action 0 description: Clicks the button diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index 11203cf9a5..ec8691e0fa 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -2349,20 +2349,6 @@ test_level_bar (void) g_object_unref (builder); } -static GObject *external_object = NULL, *external_object_swapped = NULL; - -_BUILDER_TEST_EXPORT void -on_button_clicked (GtkButton *button, GObject *data) -{ - external_object = data; -} - -_BUILDER_TEST_EXPORT void -on_button_clicked_swapped (GObject *data, GtkButton *button) -{ - external_object_swapped = data; -} - static void test_expose_object (void) { @@ -2374,33 +2360,24 @@ test_expose_object (void) "" " " " external_menu" - " " - " " " " ""; /*menu = gtk_menu_new ();*/ menu = gtk_popover_new (NULL); builder = gtk_builder_new (); - gtk_builder_expose_object (builder, "external_menu", G_OBJECT (menu)); gtk_builder_expose_object (builder, "builder", G_OBJECT (builder)); + gtk_builder_expose_object (builder, "external_menu", G_OBJECT (menu)); gtk_builder_add_from_string (builder, buffer, -1, &error); - g_assert (error == NULL); + g_assert_no_error (error); obj = gtk_builder_get_object (builder, "button"); - g_assert (GTK_IS_BUTTON (obj)); + g_assert (GTK_IS_MENU_BUTTON (obj)); g_assert (gtk_menu_button_get_popover (GTK_MENU_BUTTON (obj)) == GTK_POPOVER (menu)); - /* Connect signals and fake clicked event */ - gtk_builder_connect_signals (builder, NULL); - gtk_button_clicked (GTK_BUTTON (obj)); - - g_assert (external_object == G_OBJECT (builder)); - g_assert (external_object_swapped == G_OBJECT (builder)); - - g_object_unref (builder); g_object_unref (menu); + g_object_unref (builder); } static void -- 2.30.2